/**
* Copyright (c) 2015 UNI-TREND Co., Ltd.
* All rights reserved.  
*  
* @file        CMOS.h
* @brief       CMOS info interface
* @version     1.0 
* @author      
* @Email       
* @date        2015-12-28
*/
#ifndef COMS_H
#define COMS_H

/**
* @note: VRCB-sync with redmine's roadway version schedule. Desc in SVN log.
*/
#define VER_VRCB "V01R02C02B16"
#define VER_V 1
#define VER_R 2
#define VER_C 2
#define VER_B 16
#pragma pack(4)
    typedef struct _OtherDataHeader
    {
        unsigned short  DataType;
        unsigned int    DataBytes;
    } s_ODH;
#pragma pack()
#pragma pack(1)
    struct CMOSInfo
    {
        unsigned short  FlashType;
        unsigned char   ModelStr[10];
        unsigned char   HardwaveVerNo;
        unsigned char   SoftwaveMainVerNo;
        unsigned char   SoftwaveSubVerNo;
        unsigned char   UpdateFlag;
        unsigned char   SerialNumber[16];
        unsigned char   ManufactureDate_Year;
        unsigned char   ManufactureDate_Month;
        unsigned char   ManufactureDate_Day;
        //----------------------------------^35 bytes
        unsigned char   OtherDataCount;
        unsigned int    OtherDataFlashStartAddress;    
        s_ODH           OtherDataHeader[5];
        //----------------------------------^35 bytes
        unsigned char   FactoryMaskFlag;
        char FactoryName[8];
        char FactoryFullName[24];
        char FactoryWWW[24];
        //----------------------------------^57 bytes
    };
#pragma pack()

extern "C" struct CMOSInfo g_CMOSInfo;
extern "C" void CMOSInfo_Read(void);

#endif //COMS_H

